<script type="text/javascript"> 
      $(document).ready(function(){
      	$("ul.tabs").tabs("div.panes > div");
	    });
</script>

<script language="javascript">
var xmlHttp

function showKab(str)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  }
	var url="<?php echo site_url().'order/ajax_showKab'?>";
	
	url=url+"/"+str;
	//url=url+"&sid="+Math.random();
	//alert(url);

	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
//alert(document.getElementById("txtHint").innerHTML);
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
</script> 

<script type="text/javascript" language="javascript">
var xmlHttp //Ambil XML HTTP untuk berbagai browser
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
// ================================================================================== insert LogId(str) == start
function insertLog(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
	var url="<?php echo site_url().'order/ajax_insertKode'?>";
	url=url+"/"+str;
	//alert(url);
	xmlHttp.onreadystatechange=goInsert;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function goInsert() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("kode_log").innerHTML=xmlHttp.responseText 
 document.getElementById("new_kode_log").innerHTML=xmlHttp.responseText 
 } 
}
// ================================================================================== showKabOr(str) == finish
</script>
<div id="in_konten">
<div class="flowNav"><p><?php echo $cumb;?></p></div>                         
<h2>Check Out Member</h2>
<strong>Detail akun anda</strong>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="shoppingTable">
 <tbody>
  <tr>
    <td width="20%"><strong>Nama</strong></td>
    <td width="80%"><?php echo $acc->nama;?></td>
  </tr>
  <tr>
    <td width="13%"><strong>Telepon</strong></td>
    <td width="87%"><?php echo $acc->telp;?></td>
  </tr>
  <tr>
    <td width="13%"><strong>Mobile Phone</strong></td>
    <td width="87%"><?php echo $acc->hp;?></td>
  </tr>
  <tr>
    <td width="13%"><strong>Email</strong></td>
    <td width="87%"><?php echo $acc->email;?></td>
  </tr>
  <tr>
    <td width="13%"><strong>Alamat</strong></td>
    <td width="87%"> <?php echo $acc->alamat ?>,<?php echo $acc->kota?>,<?php echo $acc->nama_kabupaten?>,<?php echo $acc->nama_provinsi?>,<?php echo $acc->kodepos?></td>
  </tr>

</tbody>
</table>
<br />
<strong>Detail Transaksi dan Alamat Pengiriman</strong>
		<form action="" method="post" onsubmit="return check();">
		<ul class="tabs">
		<li><a class="current" href="#">Gunakan Alamat Akun</a></li>
		<li><a class="" href="#">Masukan Alamat Baru</a></li>
		</ul>
		<div class="panes">
			<div style="display: block;">
			<label class=""><strong>Alamat : </strong><?php echo $acc->alamat ?>,<?php echo $acc->kota?>,<?php echo $acc->nama_kabupaten?>,<?php echo $acc->nama_provinsi?>,<?php echo $acc->kodepos?>
			<br />
				<?php echo form_error('logistik_id', '<div class="error">', '</div>'); ?>
				<div class="form_row">
					<label class="contact"><strong>Pilih Logistik : </strong></label>
					
					<?php echo showLogistic()?>
				</div> 
				
				<div id="kode_log">
				
				</div> 
				
				<div class="form_row">
					<label class="contact"><strong>Rekening Bank :</strong></label>
					<?php echo dropDownBank()?>
				</div> 
			</div>
		<div style="display: none;">
				<div class="form_row">
					<label class="contact"><strong>Alamat Kirim :</strong></label>
					<input type="textarea" class="contact_input" name="new_alamat_kirim" value=""></textarea>
				</div> 
				
				<div class="form_row">
					<label class="contact"><strong>Propinsi :</strong></label>
					<?php echo form_error('province_id', '<div class="error">', '</div>'); ?>
					<?php echo provDropdown(set_value('province_id'))?>
				</div> 

				<div  class="form_row">
					<label class="contact"><strong>Kabupaten :</strong></label>
					<?php echo form_error('kab_id', '<div class="error">', '</div>'); ?>
					<div id="txtHint">
						<?php echo kabDropdown(set_value('province_id'),set_value('kab_id'));?>
					</div>
				</div> 

				<div class="form_row">
					<label class="contact"><strong>Kode Pos :</strong></label>
					<?php echo form_error('kodepos', '<div class="error">', '</div>'); ?>
					<input type="text" class="contact_input" name="new_kodepos" value="">
				</div> 

				<div class="form_row">
					<label class="contact"><strong>Pilih Logistik :</strong></label>
					<?php echo form_error('logistik_id', '<div class="error">', '</div>'); ?>
					<?php echo showLogistic()?>
				</div> 
				
				<div id="new_kode_log">
				
				</div> 
				
				<div class="form_row">
					<label class="contact"><strong>Rekening Bank:</strong></label>
					<?php echo dropDownBank()?>
				</div> 
			</div>
		</div>

			<div class="form_row">
				<div class="terms">
					<?php echo form_error('terms', '<div class="error">', '</div>'); ?>
					<input type="checkbox" name="terms" />
					I agree to the <a href="#info" style="color:#CCC;text-decoration:underline;"rel="facebox">terms &amp; conditions</a> 
					<?php echo getTerms('terms-order');?>
				</div>
			</div> 
			
			<div class="form_row">
				<input type="submit" class="register" value="Submit" />
			</div>   
		</form> 
	
</div>	

<br /><br /><br /><br /><br />